<template>
    <div class="app-container">
        <interface-info-detail :id="id"></interface-info-detail>
    </div>
</template>

<script>
import InterfaceInfoDetail from './components/InterfaceDetail.vue'

export default {
    name: 'InterfaceDetail',
    components: {
        InterfaceInfoDetail
    },
    data(){
        return {
            id: this.$route.params.id
        }
    },
    beforeRouteEnter(to, from, next) {
        // 修改路由元信息，不同路由使用同一个组件显示不同的tag名称
        if (to.query.name) {
            to.meta.title = "接口详情-" + to.query.name
            // console.log("tag name", to.meta.title)
        }
        next()
    },
    methods: {
    }
}
</script>

<style></style>